package com.hoshiicloud.payment.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @program: hoshiicloud
 * @description: 退款参数
 * @author: Mr.wu
 * @create: 2019-05-18 10:19
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "退款参数")
public class RefundRequest {

    @ApiModelProperty(value = "订单号,即paylist主键")
    private Long orderId;

    @ApiModelProperty(value = "支付流水的商户订单号", example = "1234567890",hidden = true)
    private String merOrderId;

    @ApiModelProperty(value = "商户号", example = "3")
    private Long merId;

    @ApiModelProperty(value = "退款金额,单位为分", example = "10")
    private Integer refundAmount;

    @ApiModelProperty(value = "退款单号", example = "123456")
    private String refundNo;

    /**
     * 订单金额
     */
    @ApiModelProperty(value = "订单总金额,单位为分", example = "10")
    private Integer totalAmount;

    @ApiModelProperty(value = "退款原因", example = "不想要了")
    private String refundDesc;


    @ApiModelProperty(value = "签名,将除sign外字段以字典升序排列，用key=value加上连接符&的方式拼接，最后追加&key=商户密钥，得到的字符串进行32位md5加密。例:key1=value1&key2=value2&key=secretKey", required = true)
    private String sign;

    @ApiModelProperty(value = "支付渠道,暂时支持weixin", example = "weixin", required = true)
    private String channel;
    @ApiModelProperty(value = "透传参数，回调时原样返回")
    private String attach;

}
